<?php
$this->pageTitle=Yii::app()->name . ' - Email Others';
$this->breadcrumbs=array(
 'Email',
);
?>
 
<h1>Email others</h1>
 
<?php if(Yii::app()->user->hasFlash('email')): ?>
 
<div class="flash-success">
 <?php echo Yii::app()->user->getFlash('email'); ?>
</div>
 
<?php else: ?>
 
<p>
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
</p>
 
<div class="form">
 
<?php $form=$this->beginWidget('CActiveForm', array(
 'id'=>'email-form',
 'enableClientValidation'=>true,
 'clientOptions'=>array(
 'validateOnSubmit'=>true,
 ),
)); ?>
 
<p class="note">Fields with <span class="required">*</span> are required.</p>
 
<?php echo $form->errorSummary($model); ?>
 
<div class="row">
 <?php echo $form->labelEx($model,'email'); ?>
 <?php echo $form->textField($model,'email'); ?>
 <?php echo $form->error($model,'email'); ?>
 </div>
 
<div class="row">
 <?php echo $form->labelEx($model,'to'); ?>
 <?php echo $form->textField($model,'to'); ?>
 <?php echo $form->error($model,'to'); ?>
 </div>
 
<div class="row">
 <?php echo $form->labelEx($model,'subject'); ?>
 <?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>128)); ?>
 <?php echo $form->error($model,'subject'); ?>
 </div>
 
<div class="row">
 <?php echo $form->labelEx($model,'message'); ?>
 <?php echo $form->textArea($model,'message',array('rows'=>6, 'cols'=>50)); ?>
 <?php echo $form->error($model,'message'); ?>
 </div>
 
<div class="row">
 <?php echo $form->labelEx($model,'from'); ?>
 <?php echo $form->textArea($model,'from'); ?>
 <?php echo $form->error($model,'from'); ?>
 </div>
 
<div class="row buttons">
 <?php echo CHtml::submitButton('Submit'); ?>
 </div>
 
<?php $this->endWidget(); ?>
 
</div><!-- form -->
 
<?php endif; ?>